package com.zjht.gmcc.bean.model;
import java.io.Serializable;


/**
 * @author ycl 2010-6-2
 * 入柜商实时库存报表对象
 *
 */
public class RgsProduct implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 6808422608133139880L;
	private String priceArea;//价格区间[<=1499,'1'],[1500-2499,'2'],[>=2500,'3']
	private String rgsCitycode;//入柜商市仓编码
	private int hallDepot;//服务厅库存
	private int cityDepot;//市仓库存
	private int totalDepot;//服务厅+市仓库存
	private int hallCount;//供货服务厅数量
	private boolean isWarning;//是否预警
	public String getPriceArea() {
		return priceArea;
	}
	public void setPriceArea(String priceArea) {
		this.priceArea = priceArea;
	}
	public String getRgsCitycode() {
		return rgsCitycode;
	}
	public void setRgsCitycode(String rgsCitycode) {
		this.rgsCitycode = rgsCitycode;
	}
	public int getHallDepot() {
		return hallDepot;
	}
	public void setHallDepot(int hallDepot) {
		this.hallDepot = hallDepot;
	}
	public int getCityDepot() {
		return cityDepot;
	}
	public void setCityDepot(int cityDepot) {
		this.cityDepot = cityDepot;
	}
	public int getHallCount() {
		return hallCount;
	}
	public void setHallCount(int hallCount) {
		this.hallCount = hallCount;
	}
	public int getTotalDepot() {
		totalDepot=getHallDepot()+getCityDepot();
		return totalDepot;
	}
	public boolean isWarning() {
		int count=0;
		if("1".equals(getPriceArea()))
			count=5*getHallCount();
		else if("2".equals(getPriceArea()))
			count=3*getHallCount();
		else if("3".equals(getPriceArea()))
			count=2*getHallCount();
		isWarning = getTotalDepot()<count ? true: false;
		return isWarning;
	}

}
